home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir38 / vga_doc2.zip / VGA.TXT < prev    next >
Text File  |  1993-01-22  |  26KB  |  552 lines

  1.        3C0h:  Attribute Controller: Address register
  2.        bit 0-4  Address of data register to write to port 3C0h
  3.         or read from port 3C1h (Reads only on VGA).
  4.          5  If set screen output is enabled and the palette can not be
  5.         modified, if clear screen output is disabled and the palette
  6.         can be modified.
  7.  
  8.  
  9.      Port 3C0h is special in that it is both address and data-write
  10.      register. Data reads happen from port 3C1h. An internal
  11.      flip-flop remembers whether it is currently acting as
  12.      address or data register.
  13.      Accesses to the attribute controller must be separated by
  14.      at least 250ns.
  15.      Reading port 3dAh will reset the flip-flop to address mode.
  16.  
  17.  
  18.        3C0h index 0-Fh  (r/W): Attribute: Palette
  19.      bit 0  (EGA) Primary Blue
  20.          1  (EGA) Primary Green
  21.          2  (EGA) Primary Red
  22.          3  (EGA) Secondary Blue
  23.          4  (EGA) Secondary Green
  24.          5  (EGA) Secondary Red
  25.        0-5  (VGA) Index into the 256 color DAC table.
  26.               May be modified by 3C0h index 10h and 14h.
  27.  
  28.        3C0h index 10h (r/W): Attribute: Mode Control Register
  29.      bit 0  Graphics mode if set, Alphanumeric mode else.
  30.          1  Monochrome mode if set, color mode else.
  31.          2  9-bit wide characters if set.
  32.         The 9th bit of characters C0h-DFh will be the same as
  33.         the 8th bit. Otherwise it will be the background color.
  34.          3  If set Attribute bit 7 is blinking, else high intensity.
  35.          5  (VGA Only) If set the PEL panning register (3C0h index 13h)
  36.                is temporarily set to 0 from when the line
  37.                compare causes a wrap around until the next
  38.                vertical retrace when the register is automatically
  39.                reloaded with the old value, else the PEL
  40.                panning register ignores line compares.
  41.          6  (VGA Only) If set pixels are 8 bits wide.
  42.                Used in 256 color modes.
  43.          7  (VGA Only) If set bit 4-5 of the index into the DAC table
  44.                are taken from port 3C0h index 14h bit 0-1,
  45.                else the bits in the palette register are used.
  46.  
  47.        3C0h index 11h (r/W): Attribute: Overscan Color Register.
  48.        bit 0-5  Color of screen border. Color is defined as in the
  49.         palette registers.
  50.        Note: The EGA requires the Overscan color to be 0 in high resolution
  51.          modes.
  52.  
  53.        3C0h index 12h (r/W): Attribute: Color Plane Enable Register
  54.      bit 0  Bit plane 0 is enabled if set.
  55.          1  Bit plane 1 is enabled if set.
  56.          2  Bit plane 2 is enabled if set.
  57.          3  Bit plane 3 is enabled if set.
  58.        4-5  Video Status MUX. Diagnostics use only.
  59.         Two attribute bits appear on bits 4 and 5 of the Input
  60.         Status Register 1 (3dAh).
  61.           Value       EGA            VGA
  62.             0      Red/Blue        Bit 2/Bit 0
  63.             1      Blue'/Green     Bit 5/Bit 4
  64.             2      Red'/Green'     Bit 3/Bit 1
  65.             3                      Bit 7/Bit 6
  66.  
  67.        3C0h index 13h (r/W): Attribute: Horizontal PEL Panning Register
  68.        bit 0-3  Indicates number of pixels to shift the display left
  69.          Value  9bit textmode   256color mode   Other modes
  70.             0          1               0              0
  71.             1          2              n/a             1
  72.             2          3               1              2
  73.             3          4              n/a             3
  74.             4          5               2              4
  75.             5          6              n/a             5
  76.             6          7               3              6
  77.             7          8              n/a             7
  78.             8          0              n/a            n/a
  79.  
  80.        3C0h index 14h (r/W): Attribute: Color Select Register  (VGA Only)
  81.        bit 0-1  If 3C0h index 10h bit 7 is set these 2 bits are used
  82.         as bits 4-5 of the index into the DAC table.
  83.        2-3  These 2 bits are used as bit 6-7 of the index into the
  84.         DAC table except in 256 color mode.
  85.  
  86.        Note: this register does not affect 256 color modes.
  87.  
  88.  
  89.        3C2h (R): Input Status #0 Register
  90.      bit 4  Status of the switch selected by the Miscellaneous Output
  91.         Register 3C2h bit 2-3. Switch high if set.
  92.          5  (EGA Only) Pin 19 of the Feature Connector (FEAT0)
  93.                is high if set
  94.          6  (EGA Only) Pin 17 of the Feature Connector (FEAT1)
  95.                is high if set
  96.          7  (EGA Only ??) If set IRQ 2 has happened due to Vertical
  97.               Retrace. Should be cleared by IRQ 2 interrupt routine
  98.               by clearing port 3d4h index 11h bit 4.
  99.  
  100.  
  101.        3C2h (W): Miscellaneous Output Register
  102.      bit 0  If set Color Emulation. Base Address=3Dxh
  103.         else Mono Emulation. Base Address=3Bxh.
  104.          1  Enable CPU Access to video memory if set
  105.        2-3  Clock Select
  106.           0: 14MHz(EGA)     25MHz(VGA)
  107.           1: 16MHz(EGA)     28MHz(VGA)
  108.           2: External(EGA)  Reserved(VGA)
  109.          4  (EGA Only) Disable internal video drivers if set
  110.          5  When in Odd/Even modes Select High 64k bank if set
  111.          6  Horizontal Sync Polarity. Negative if set
  112.          7  Vertical Sync Polarity. Negative if set
  113.         Bit 6-7 indicates the number of lines on the display:
  114.              0=200(EGA)  Reserved(VGA)
  115.              1=          400(VGA)
  116.              2=350(EGA)  350(VGA)
  117.              3=          480(VGA).
  118.  
  119.        Note: Set to all zero on a hardware reset.
  120.        Note: On the VGA this register can be read from port 3CCh.
  121.  
  122.  
  123.        3C3h (W): Video Subsystem Enable Register
  124.      bit 0  Enables the VGA display if set
  125.  
  126.  
  127.        3C4h index  0  (r/W): Sequencer: Reset
  128.      bit 0  (EGA) Asynchronous Reset if clear
  129.          0  (VGA) Synchronous Reset just as bit 1
  130.          1  Synchronous Reset if clear
  131.  
  132.        3C4h index  1  (r/W): Sequencer: Clocking Mode
  133.      bit 0  If set character clocks are 8 dots wide, else 9.
  134.          1  (EGA Only) If set the CRTC uses 2/5 of the clock cycles, else 4/5.
  135.          2  If set loads video serializers every other character
  136.         clock cycle, else every one.
  137.          3  If set the Dot Clock is Master Clock/2, else same as
  138.         Master Clock (See 3C2h bit 2-3). (Doubles pixels).
  139.          4  (VGA Only) If set loads video serializers every fourth
  140.                character clock cycle, else every one.
  141.          5  (VGA Only) if set turns off screen and gives all memory
  142.                cycles to the CPU interface.
  143.  
  144.        3C4h index  2  (r/W): Sequencer: Map Mask Register
  145.      bit 0  Enable writes to plane 0 if set
  146.          1  Enable writes to plane 1 if set
  147.          2  Enable writes to plane 2 if set
  148.          3  Enable writes to plane 3 if set
  149.  
  150.        3C4h index  3  (r/W): Sequencer: Character Map Select Register
  151.        bit 0-1  (EGA) Selects EGA Character Map (0..3) if bit 3 of
  152.               the character attribute is clear.
  153.        2-3  (EGA) Selects EGA Character Map (0..3) if bit 3 of
  154.               the character attribute is set.
  155.      0,1,4  (VGA) Selects VGA Character Map (0..7) if bit 3 of
  156.               the character attribute is clear.
  157.      2,3,5  (VGA) Selects VGA Character Map (0..7) if bit 3 of
  158.               the character attribute is set.
  159.  
  160.           Character Maps are placed at:
  161.            Map no. (EGA/VGA)       Map no. (VGA)
  162.               0       0k              4      8k
  163.               1      16k              5     24k
  164.               2      32k              6     40k
  165.               3      48k              7     56k
  166.  
  167.        3C4h index  4  (r/W): Sequencer: Memory Mode Register
  168.      bit 0  Set if in an alphanumeric mode, clear in graphics modes.
  169.          1  Set if more than 64kbytes on the adapter.
  170.          2  Enables Odd/Even addressing mode if set.
  171.         Odd/Even mode places all odd bytes in plane 1&3, and
  172.         all even bytes in plane 0&2.
  173.          3  (VGA Only)  If set address bit 0-1 selects video memory
  174.                 planes (256 color mode), rather than the
  175.                 Map Mask and Read Map Select Registers.
  176.  
  177.        3C4h index 7 (R/W): Sequencer Horizontal Character Counter Reset Register.
  178.                (VGA  Only).
  179.        Note: Undocumented by IBM. May not be available in all clones.
  180.        Note: A write to this register will cause the Horizontal Character Counter
  181.          to be held reset (=0) until a write happens to any of the Sequencer
  182.          registers index 0..6.
  183.          The Vertical Line counter is clocked by a signal derived from the
  184.          Horizontal Display Enable (which does not occur if the Horizontal
  185.          Character Counter is held reset).
  186.          Thus a write to index 7 during Vertical Retrace can stop the display
  187.          timing and allow software to start the next frame reasonably
  188.          synchronous to an external event.
  189.      
  190.        3C6h (R/W): PEL Mask          (VGA Only)
  191.        bit 0-7  This register is anded with the palette index sent
  192.         for each dot. Should be set to FFh.
  193.  
  194.        3C7h (R): DAC State Register  (VGA Only)
  195.        bit 0-1  0 indicates the DAC is in Read Mode and 3 indicates
  196.         write mode.
  197.  
  198.        3C7h (W): PEL Address Read Mode           (VGA Only)
  199.        bit 0-7  The PEL data register (0..255) to be read from 3C9h.
  200.  
  201.        Note:  After reading the 3 bytes at 3C9h this register will
  202.           increment, pointing to the next data register.
  203.  
  204.        3C8h (R/W): PEL Address Write Mode        (VGA Only)
  205.        bit 0-7  The PEL data register (0..255) to be written to 3C9h.
  206.        Note:  After writing the 3 bytes at 3C9h this register will
  207.           increment, pointing to the next data register.
  208.  
  209.        3C9h (R/W): PEL Data Register             (VGA Only)
  210.        bit 0-5  Color value
  211.        Note:  Each read or write of this register will cycle through first
  212.           the registers for Red, Blue and Green, then increment the 
  213.           appropriate address register, thus the entire palette can be
  214.           loaded by writing 0 to the PEL Address Write Mode register 3C8h
  215.           and then writing all 768 bytes of the palette to this register.
  216.  
  217.        3CAh (R): Feature Control Register           (VGA Only)
  218.      Bit 3  (VGA Only) Vertical Sync Select
  219.            If set Vertical Sync to the monitor is the logical OR
  220.            of the vertical sync and the vertical display enable.
  221.        Note: This register is written to port 3dAh and read from 3CAh.
  222.  
  223.  
  224.        3CAh (W): Graphics 2 Position                (EGA Only)
  225.        bit 0-1  Select which bit planes should be controlled by
  226.         Graphics Controller #2. Always set to 1.
  227.  
  228.        3CCh (R): Miscellaneous Output Register      (VGA Only)
  229.      bit 0  If set Color Emulation. Base Address=3Dxh
  230.            else Mono Emulation. Base Address=3Bxh.
  231.          1  Enable CPU Access to video memory if set
  232.        2-3  Clock Select
  233.           0= 25MHz, 1= 28MHz, 2= Reserved
  234.          5  When in Odd/Even modes Select High 64k bank if set
  235.          6  Horizontal Sync Polarity. Negative if set
  236.          7  Vertical Sync Polarity. Negative if set
  237.         Bit 6-7 indicates the number of lines on the display:
  238.              0=Reserved, 1=400, 2=350, 3=480.
  239.        Note: This register is written to port 3C2h and read from port 3CCh.
  240.  
  241.  
  242.        3CCh (W): Graphics 1 Position                (EGA Only)
  243.        bit 0-1  Select which bit planes should be controlled by
  244.         Graphics Controller #1. Always set to 0.
  245.  
  246.        3CEh index  0  (r/W): Graphics: Set/Reset Register
  247.      bit 0  If in Write Mode 0 and bit 0 of 3CEh index 1 is set
  248.          a write to display memory will set all the bits in
  249.          plane 0 of the byte to this bit, if the corresponding
  250.          bit is set in the Map Mask Register (3CEh index 8).
  251.          1  Same for plane 1 and bit 1 of 3CEh index 1.
  252.          2  Same for plane 2 and bit 2 of 3CEh index 1.
  253.          3  Same for plane 3 and bit 3 of 3CEh index 1.
  254.  
  255.        3CEh index  1  (r/W): Graphics: Enable Set/Reset Register
  256.      bit 0  If set enables Set/reset of plane 0 in Write Mode 0.
  257.          1  Same for plane 1.
  258.          2  Same for plane 2.
  259.          3  Same for plane 3.
  260.  
  261.        3CEh index  2  (r/W): Graphics: Color Compare Register
  262.        bit 0-3  In Read Mode 1 each pixel at the address of the byte read
  263.         is compared to this color and the corresponding bit in
  264.         the output set to 1 if they match, 0 if not.
  265.         The Color Don't Care Register (3CEh index 7) can exclude
  266.         bitplanes from the comparison.
  267.  
  268.        3CEh index  3  (r/W): Graphics: Data Rotate
  269.        bit 0-2  Number of positions to rotate data right before it is
  270.         written to display memory. Only active in Write Mode 0.
  271.        3-4  In Write Mode 2 this field controls the relation between
  272.         the data written from the CPU, the data latched from the
  273.         previous read and the data written to display memory:
  274.           0: CPU Data is written unmodified
  275.           1: CPU data is ANDed with the latched data
  276.           2: CPU data is ORed  with the latch data.
  277.           3: CPU data is XORed with the latched data.
  278.  
  279.  
  280.        3CEh index  4  (r/W): Graphics: Read Map Select Register
  281.        bit 0-1  Number of the plane Read Mode 0 will read from.
  282.  
  283.        3CEh index  5  (r/W): Graphics: Mode Register
  284.        bit 0-1  Write Mode: Controls how data from the CPU is
  285.         transformed before being written to display memory:
  286.           0: Mode 0 works as a Read-Modify-Write operation.
  287.              First a read access loads the data latches of the EGA/VGA
  288.              with the value in video memory at the addressed location. 
  289.              Then a write access will provide the destination address 
  290.              and the CPU data byte. The data written is modified by the
  291.              function code in the Data Rotate register (3CEh index 3) as
  292.              a function of the CPU data and the latches, then data
  293.              is rotated as specified by the same register.  
  294.           1: Mode 1 is used for video to video transfers.
  295.              A read access will load the data latches with the contents
  296.              of the addressed byte of video memory. A write access will
  297.              write the contents of the latches to the addressed byte.
  298.              Thus a single MOVSB instruction can copy all pixels in the
  299.              source address byte to the destination address.
  300.           2: Mode 2 writes a color to all pixels in the addressed byte
  301.              of video memory. Bit 0 of the CPU data is written to plane 0
  302.              et cetera. Individual bits can be enabled or disabled through
  303.              the Bit Mask register (3CEh index 8). 
  304.           3: (VGA Only) Mode 3 can be used to fill an area with a color and
  305.              pattern. The CPU data is rotated according to 3CEh index 3 
  306.              bits 0-2 and anded with the Bit Mask Register (3CEh index 8).
  307.              For each bit in the result the corresponding pixel is set to
  308.              the color in the Set/Reset Register (3CEh index 0 bits 0-3)
  309.              if the bit is set and to the contents of the processor latch
  310.              if the bit is clear.
  311.          2  (EGA Only) Forces all outputs to a high impedance state if set.
  312.          3  Read Mode
  313.           0: Data is read from one of 4 bit planes depending
  314.              on the Read Map Select Register (3CEh index 4).
  315.           1: Data returned is a comparison between the 8 pixels
  316.              occupying the read byte and the color in the
  317.              Color Compare Register (3CEh index 2).
  318.              A bit is set if the color of the corresponding
  319.              pixel matches the register.
  320.          4  Enables Odd/Even mode if set (See 3C4h index 4 bit 2).
  321.          5  Enables CGA style 4 color pixels using even/odd bit pairs
  322.         if set.
  323.          6  (VGA Only) Enables 256 color mode if set.
  324.  
  325.        3CEh index  6  (r/W): Graphics: Miscellaneous Register
  326.      bit 0  Indicates Graphics Mode if set, Alphanumeric mode else.
  327.          1  Enables Odd/Even mode if set.
  328.        2-3  Memory Mapping:
  329.           0: use A000h-BFFFh
  330.           1: use A000h-AFFFh   EGA/VGA Graphics modes
  331.           2: use B000h-B7FFh   Monochrome modes
  332.           3: use B800h-BFFFh   CGA modes
  333.  
  334.        3CEh index  7  (r/W): Graphics: Color Don't Care Register
  335.      bit 0  Ignore bit plane 0 in Read mode 1 if clear.
  336.          1  Ignore bit plane 1 in Read mode 1 if clear.
  337.          2  Ignore bit plane 2 in Read mode 1 if clear.
  338.          3  Ignore bit plane 3 in Read mode 1 if clear.
  339.  
  340.        3CEh index  8  (r/W): Graphics: Bit Mask Register
  341.        bit 0-7  Each bit if set enables writing to the corresponding
  342.         bit of a byte in display memory.
  343.  
  344.  
  345.        3d4h index  0  (r/W): CRTC: Horizontal Total Register
  346.        bit 0-7  (EGA) Horizontal Total Character Clocks-2
  347.        0-7  (VGA) Horizontal Total Character Clocks-5
  348.  
  349.        3d4h index  1  (r/W): CRTC: Horizontal Display End Register
  350.        bit 0-7  Number of Character Clocks Displayed -1
  351.  
  352.        3d4h index  2  (r/W): CRTC: Start Horizontal Blanking Register
  353.        bit 0-7  The count at which Horizontal Blanking starts
  354.  
  355.        3d4h index  3  (r/W): CRTC: End Horizontal Blanking Register
  356.        bit 0-4  Horizontal Blanking ends when the last 5 (6 for VGA)
  357.         bits of the character counter equals this field.
  358.         (VGA) The sixth bit is found in port 3d4h index 5 bit 7.
  359.        5-6  Number of character clocks to delay start of display
  360.         after Horizontal Total has been reached.
  361.          7  (VGA Only) Access to Vertical Retrace registers if set
  362.                If clear reads to 3d4h index 10h and 11h 
  363.                access the Lightpen readback registers ?? 
  364.  
  365.        3d4h index  4  (r/W): CRTC: Start Horizontal Retrace Register
  366.        bit 0-7  Horizontal Retrace starts when the Character Counter
  367.         reaches this value.
  368.  
  369.        3d4h index  5  (r/W): CRTC: End Horizontal Retrace Register
  370.        bit 0-4  Horizontal Retrace ends when the last 5 bits of the
  371.         character counter equals this value.
  372.        5-6  Number of character clocks to delay start of display
  373.         after Horizontal Retrace.
  374.          7  (EGA) Provides Smooth Scrolling in Odd/Even mode.
  375.               When set display starts from an odd byte.
  376.          7  (VGA) bit 5 of the End Horizontal Blanking count
  377.               (See 3d4h index 3 bit 0-4).
  378.  
  379.        3d4h index  6  (r/W): CRTC: Vertical Total Register
  380.        bit 0-7  Lower 8 bits of the Vertical Total
  381.         Bit 8 is found in 3d4h index 7 bit 0.
  382.         (VGA) Bit 9 is found in 3d4h index 7 bit 5.
  383.        Note: For the VGA this value is the number of scan lines in the display -2.
  384.  
  385.        3d4h index  7  (r/W): CRTC: Overflow Register
  386.      bit 0  Bit 8 of Vertical Total (3d4h index 6)
  387.          1  Bit 8 of Vertical Display End (3d4h index 12h)
  388.          2  Bit 8 of Vertical Retrace Start (3d4h index 10h)
  389.          3  Bit 8 of Start Vertical Blanking (3d4h index 15h)
  390.          4  Bit 8 of Line Compare Register (3d4h index 18h)
  391.          5  (VGA) Bit 9 of Vertical Total (3d4h index 6)
  392.          6  (VGA) Bit 9 of Vertical Display End (3d4h index 12h)
  393.          7  (VGA) Bit 9 of Vertical Retrace Start (3d4h index 10h)
  394.  
  395.        3d4h index  8  (r/W): CRTC: Preset Row Scan Register
  396.        bit 0-4  Number of lines we have scrolled down in the first
  397.         character row. Provides Smooth Vertical Scrolling.
  398.        5-6  (VGA Only) Number of bytes to skip at the start of
  399.         scanline. Provides Smooth Horizontal Scrolling
  400.         together with the Horizontal Panning Register
  401.         (3C0h index 13h).
  402.  
  403.        3d4h index  9  (r/W): CRTC: Maximum Scan Line Register
  404.        bit 0-4  Number of scan lines in a character row -1
  405.          5  (VGA) Bit 9 of Start Vertical Blanking
  406.          6  (VGA) Bit 9 of Line Compare Register
  407.          7  (VGA) Doubles each scan line if set.
  408.         I.e displays 200 lines on a 400 display.
  409.  
  410.        3d4h index  Ah (r/W): CRTC: Cursor Start Register
  411.        bit 0-4  First scanline of cursor within character.
  412.          5  (VGA) Turns Cursor off if set
  413.  
  414.        3d4h index  Bh (r/W): CRTC: Cursor End Register
  415.        bit 0-4  Last scanline of cursor within character
  416.        5-6  Delay of cursor data in character clocks.
  417.  
  418.        3d4h index  Ch (r/W): CRTC: Start Address High Register
  419.        bit 0-7  Upper 8 bits of the start address of the display buffer
  420.  
  421.        3d4h index  Dh (r/W): CRTC: Start Address Low Register
  422.        bit 0-7  Lower 8 bits of the start address of the display buffer
  423.  
  424.        3d4h index  Eh (r/W): CRTC: Cursor Location High Register
  425.        bit 0-7  Upper 8 bits of the address of the cursor
  426.  
  427.        3d4h index  Fh (r/W): CRTC: Cursor Location Low Register
  428.        bit 0-7  Lower 8 bits of the address of the cursor
  429.  
  430.        3d4h index 10h (R): CRTC: Light Pen High Register     (EGA Only)
  431.        bit 0-7  (EGA Only)  Upper 8 bits of the address of the
  432.                 lightpen position.
  433.  
  434.        3d4h index 10h (r/W): CRTC: Vertical Retrace Start Register
  435.        bit 0-7  Lower 8 bits of Vertical Retrace Start. Vertical Retrace
  436.         starts when the line counter reaches this value.
  437.         Bit 8 is found in 3d4h index 7 bit 2.
  438.         (VGA Only) Bit 9 is found in 3d4h index 7 bit 7.
  439.  
  440.        3d4h index 11h (R): CRTC: Light Pen Low Register      (EGA Only)
  441.        bit 0-7  (EGA Only)  Lower 8 bits of the address of the
  442.                 lightpen position.
  443.  
  444.        3d4h index 11h (r/W): CRTC: Vertical Retrace End Register
  445.        bit 0-3  Vertical Retrace ends when the last 4 bits of the
  446.         line counter equals this value.
  447.          4  if clear Clears pending Vertical Interrupts.
  448.          5  Vertical Interrupts (IRQ 2) disabled if set.
  449.         Can usually be left disabled, but some systems
  450.         (including PS/2) require it to be enabled.
  451.          6  (VGA Only) If set selects 5 refresh cycles per
  452.                scanline rather than 3.
  453.          7  (VGA Only) Disables writing to registers 0-7 if set
  454.              3d4h index 7 bit 4 is not affected by this bit.
  455.  
  456.        3d4h index 12h (r/W): CRTC: Vertical Display End Register
  457.        bit 0-7  Lower 8 bits of Vertical Display End. The display
  458.         ends when the line counter reaches this value.
  459.         Bit 8 is found in 3d4h index 7 bit 1.
  460.         (VGA Only) Bit 9 is found in 3d4h index 7 bit 6.
  461.  
  462.        3d4h index 13h (r/W): CRTC: Offset register
  463.        bit 0-7  Number of bytes in a scanline / K. Where K is 2 for
  464.         byte mode, 4 for word mode and 8 for Double Word mode.
  465.  
  466.        3d4h index 14h (r/W): CRTC: Underline Location Register
  467.        bit 0-4  Position of underline within Character cell.
  468.          5  (VGA Only) If set memory address is only changed
  469.                every fourth character clock.
  470.          6  (VGA Only) Double Word mode addressing if set
  471.  
  472.        3d4h index 15h (r/W): CRTC: Start Vertical Blank Register
  473.        bit 0-7  Lower 8 bits of Vertical Blank Start. Vertical blanking
  474.         starts when the line counter reaches this value.
  475.         Bit 8 is found in 3d4h index 7 bit 3.
  476.  
  477.        3d4h index 16h (r/W): CRTC: End Vertical Blank Register
  478.        bit 0-4  (EGA) Vertical blanking stops when the lower 5 bits
  479.               of the line counter equals this field.
  480.        0-6  (VGA) Vertical blanking stops when the lower 7 bits
  481.               of the line counter equals this field.
  482.  
  483.        3d4h index 17h (r/W): CRTC: Mode Control Register
  484.      bit 0  If clear use CGA compatible memory addressing system
  485.         by substituting character row scan counter bit 0 for
  486.         address bit 13, thus creating 2 banks for even and
  487.         odd scan lines.
  488.          1  If clear use Hercules compatible memory addressing
  489.         system by substituting character row scan counter bit 1 for
  490.         address bit 14, thus creating 4 banks.
  491.          2  If set increase scan line counter only every second line.
  492.          3  If set increase memory address counter only every other
  493.         character clock.
  494.          4  (EGA Only) If set disable the EGA output drivers. This bit
  495.         is used for other purposes in some Super VGA chips.
  496.          5  When in Word Mode bit 15 is rotated to bit 0 if this bit
  497.         is set else bit 13 is rotated into bit 0.
  498.          6  If clear system is in word mode. Addresses are rotated
  499.         1 position up bringing either bit 13 or 15 into bit 0.
  500.          7  Clearing this bit will reset the display system
  501.         until the bit is set again.
  502.  
  503.        3d4h index 18h (r/W): CRTC: Line Compare Register
  504.        bit 0-7  Lower 8 bits of the Line Compare. When the Line counter
  505.           reaches this value, the display address wraps to 0.
  506.           Provides Split Screen facilities.
  507.           Bit 8 is found in 3d4h index 7 bit 4.
  508.           (VGA Only) Bit 9 is found in 3d4h index 9 bit 6.
  509.  
  510.        3d4h index 22h (R): Memory Latch Register              (VGA - Undocumented).
  511.        bit 0-7  Reads the contents of the Graphics Controller Memory Data Latch
  512.         for the plane selected by 3C0h index 4 bit 0-1 (Read Map Select).
  513.        Note: This register is not documented by IBM and may not be available
  514.          on all clones.
  515.  
  516.        3d4h index 24h (R): Attribute Controller Toggle Register. 
  517.                                   (VGA - Undocumented).  
  518.        bit 0-4  Attribute Controller Index. 
  519.         The current value of the Attribute Index Register.
  520.          5  Palette Address Source. Same as 3C0h bit 5.
  521.          7  If set next read or write to 3C0h will access the data register.       
  522.        Note: This register is not documented by IBM and may not be available
  523.          on all clones.
  524.  
  525.        3d4h index 30h-3Fh (W): Clear Vertical Display Enable. (VGA - Undocumented).   
  526.        bit   0  Setting this bit will clear the Vertical Display Enable thus 
  527.         blanking the display for the rest of the frame and giving the CPU
  528.         total access to display memory until the start of the next frame.
  529.        Note: This register is not documented by IBM and may not be available
  530.          on all clones.
  531.  
  532.        3dAh (R): Input Status #1 Register
  533.      bit 0  Either Vertical or Horizontal Retrace active if set
  534.          1  (EGA Only) Light Pen has triggered if set
  535.          2  (EGA Only) Light Pen switch is open if set
  536.          3  Vertical Retrace in progress if set
  537.        4-5  (EGA Only) Shows two of the 6 color outputs,
  538.         depending on 3C0h index 12h bit 4-5:
  539.            Attr: Bit 4-5:   Out bit 4  Out bit 5
  540.                 0          Blue       Red
  541.                 1        I Blue       Green
  542.                 2        I Red      I Green
  543.  
  544.        3dAh (W): Feature Control Register
  545.      bit 0  (EGA Only) Output to pin 21 of the Feature Connector.
  546.          1  (EGA Only) Output to pin 20 of the Feature Connector.
  547.          3  (VGA Only) Vertical Sync Select
  548.            If set Vertical Sync to the monitor is the logical OR
  549.            of the vertical sync and the vertical display enable.
  550.  
  551.        Note: On the VGA this register can be read from port 3CAh.
  552.